home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Tools & Apps / Graphics & Imaging / Printer Drivers / STD File Saver 1.1 / MyPDEF_7_PrGeneral.p < prev    next >
Encoding:
Text File  |  1990-06-03  |  1.4 KB  |  64 lines  |  [TEXT/MPS ]

  1. unit MyPDEF_7_PrGeneral;
  2.  
  3. interface
  4.  
  5. uses MemTypes, QuickDraw, OsIntf, ToolIntf, PackIntf, MacPrint;
  6.  
  7. {$D+}
  8. {$R-}
  9. {$OV-}
  10.  
  11. type
  12.     TGetRslBlkPtr = ^TGetRslBlk;
  13.     TSetRslBlkPtr = ^TSetRslBlk;
  14.     TDftBitsBlkPtr = ^TDftBitsBlk;
  15.     TGetRotnBlkPtr = ^TGetRotnBlk;
  16.  
  17. procedure FilePrGeneral(pData: Ptr);
  18.  
  19. implementation
  20.  
  21. procedure FilePrGeneral(pData: Ptr);
  22. { refer to Inside Macintosh vol. V and the relevant Technical Notes for details }
  23.     begin
  24.         case TGetRslBlkPtr(pData)^.iOpCode of
  25.             getRslDataOp: with TGetRslBlkPtr(pData)^ do
  26.                 begin
  27.                     iError := noErr;
  28.                     iRgType := 1;
  29.                     XRslRg.iMin := 0;
  30.                     XRslRg.iMax := 0;
  31.                     YRslRg.iMin := 0;
  32.                     YRslRg.iMax := 0;
  33.                     iRslRecCnt := 1;
  34.                     rgRslRec[1].iXRsl := 72;
  35.                     rgRslRec[1].iYRsl := 72;
  36.                 end;
  37.             setRslOp: with TSetRslBlkPtr(pData)^ do
  38.                 begin
  39.                     if (iXRsl <> 72) or (iYRsl <> 72)
  40.                         then iError := noSuchRsl
  41.                         else iError := noErr;
  42.                     hPrint^^.prInfo.iVRes := 72;
  43.                     hPrint^^.prInfo.iHRes := 72;
  44.                     hPrint^^.prInfoPT.iVRes := 72;
  45.                     hPrint^^.prInfoPT.iHRes := 72;
  46.                 end;
  47.             draftBitsOp: with TDftBitsBlkPtr(pData)^ do
  48.                 begin
  49.                     iError := 2; {opNotImpl}
  50.                 end;
  51.             noDraftBitsOp: with TDftBitsBlkPtr(pData)^ do
  52.                 begin
  53.                     iError := 2; {opNotImpl}
  54.                 end;
  55.             getRotnOp: with TGetRotnBlkPtr(pData)^ do
  56.                 begin
  57.                     iError := noErr;
  58.                     fLandScape := (hPrint^^.printX[6] = 1);
  59.                 end;
  60.         end;
  61.     end;
  62.  
  63. end.
  64.